<script setup>
import { onMounted, onUnmounted } from "vue";
import router from "@/router/index";
import { _$, $ } from "./detail";

onMounted(() => {
  _$.requestParam.id = router.currentRoute.value.query.id;
  $.loadDetail();
});

onUnmounted(() => {
  $.clean();
});
</script>

<template>
  <el-space direction="vertical" fill wrap class="w-fill" :size="20">
    <el-page-header @back="router.back()">
      <template #content>
        <span class="text-large font-600 mr-3"> 过敏史详情 </span>
      </template>
    </el-page-header>
    <el-card class="w-fill" shadow="never">
      <el-descriptions title="基本信息" :column="3">
        <el-descriptions-item label="用户">
          {{ _$.responseParam.userId }}
        </el-descriptions-item>
        <el-descriptions-item label="过敏信息">
          {{ _$.responseParam.allergyId }}
        </el-descriptions-item>
        <el-descriptions-item label="症状描述">
          {{ _$.responseParam.description }}
        </el-descriptions-item>
        <el-descriptions-item label="发生时间">
          {{ _$.responseParam.date }}
        </el-descriptions-item>
        <el-descriptions-item label="过敏源">
          {{ _$.responseParam.source }}
        </el-descriptions-item>
      </el-descriptions>
    </el-card>
  </el-space>
</template>

<style scoped></style>
